<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>盒子尺寸</title>
    <style>
        div {
            /* width: 200px; */
            /* height: 200px; */
            background-color: pink;
            /* 手动内减 */
            /* width: 180px; */
            /* height: 180px; */
            /* 自动内减 */
            box-sizing: border-box;
            padding: 20px;
        }
    </style>
</head>
<body>
    <div>盒子尺寸</div>
</body>
</html>